<?php

use Illuminate\Database\Seeder;

class GoodTableSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        $data = [];
        for ($i=0; $i < 100; $i++) { 
        	$tem['proname'] = str_random(10);
        	$tem['cateid'] = rand(1,20);
        	$tem['price'] = rand(1,20);
        	$tem['store'] = rand(1,20);
        	$tem['des'] = str_random(10);
        	$tem['state'] = rand(1,20);
        	$tem['addtime'] = date('Y-m-d H:i:s',time());
        	$data[] = $tem;
        }
        DB::table('goods')->insert($data);
    }
}
